package com.yanfan.iot.tdengine.dao;

import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

/**
 * @package com.yanfan.mysql.mysql.tdengine
 * 类名: DatabaseMapper
 * 时间: 2022/5/16,0016 1:27
 * 开发人: wxy
 */
public interface CustTDMapper {


    /***
     * 创建超级表
     */
    @Update(" CREATE STABLE if not exists ${database}.`b_device_history_data`\n"
            + "    (`report_time` TIMESTAMP,\n"
            + "        `dept_id_strs` NCHAR(255),\n"
            + "        `device_imei` NCHAR(50),\n"
            + "        `device_name` NCHAR(50),\n"
            + "        `param_name` NCHAR(20),\n"
            + "        `param_field` NCHAR(50),\n"
            + "        `param_value` DOUBLE,\n"
            + "        `param_unit` NCHAR(10))\n"
            + "    TAGS (`id` BIGINT UNSIGNED) ")
    int createDeviceHistoryDataSTable(String database);

}
